package hos.java.color;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>Title: ColorFlutter </p>
 * <p>Description:  </p>
 * <p>Company: www.mapuni.com </p>
 *
 * @author : 蔡俊峰
 * @version : 1.0
 * @date : 2023/3/28 20:16
 */
public class ColorConfig {

    /// Completely invisible.
    public static final int transparent = 0x00000000;

    /// Completely opaque black.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png)
    ///
    /// See also:
    ///
    ///  * [black87], [black54], [black45], [black38], [black26], [black12], which
    ///    are variants on this color but with different opacities.
    ///  * [white], a solid white color.
    ///  * [transparent], a fully-transparent color.
    public static final int black = 0xFF000000;

    /// Black with 87% opacity.
    ///
    /// This is a good contrasting color for text in light themes.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png)
    ///
    /// See also:
    ///
    ///  * [Typography.black], which uses this color for its text styles.
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [black], [black54], [black45], [black38], [black26], [black12], which
    ///    are variants on this color but with different opacities.
    public static final int black87 = 0xDD000000;

    /// Black with 54% opacity.
    ///
    /// This is a color commonly used for headings in light themes. It's also used
    /// as the mask color behind dialogs.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png)
    ///
    /// See also:
    ///
    ///  * [Typography.black], which uses this color for its text styles.
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [black], [black87], [black45], [black38], [black26], [black12], which
    ///    are variants on this color but with different opacities.
    public static final int black54 = 0x8A000000;

    /// Black with 45% opacity.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png)
    ///
    /// See also:
    ///
    ///  * [black], [black87], [black54], [black38], [black26], [black12], which
    ///    are variants on this color but with different opacities.
    public static final int black45 = 0x73000000;

    /// Black with 38% opacity.
    ///
    /// For light themes, i.e. when the Theme's [ThemeData.brightness] is
    /// [Brightness.light], this color is used for disabled icons and for
    /// placeholder text in [DataTable].
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png)
    ///
    /// See also:
    ///
    ///  * [black], [black87], [black54], [black45], [black26], [black12], which
    ///    are variants on this color but with different opacities.
    public static final int black38 = 0x61000000;

    /// Black with 26% opacity.
    ///
    /// Used for disabled radio buttons and the text of disabled flat buttons in light themes.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png)
    ///
    /// See also:
    ///
    ///  * [ThemeData.disabledColor], which uses this color by default in light themes.
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [black], [black87], [black54], [black45], [black38], [black12], which
    ///    are variants on this color but with different opacities.
    public static final int black26 = 0x42000000;

    /// Black with 12% opacity.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.blacks.png)
    ///
    /// Used for the background of disabled raised buttons in light themes.
    ///
    /// See also:
    ///
    ///  * [black], [black87], [black54], [black45], [black38], [black26], which
    ///    are variants on this color but with different opacities.
    public static final int black12 = 0x1F000000;

    /// Completely opaque white.
    ///
    /// This is a good contrasting color for the [ThemeData.primaryColor] in the
    /// dark theme. See [ThemeData.brightness].
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// See also:
    ///
    ///  * [Typography.white], which uses this color for its text styles.
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [white70], [white60], [white54], [white38], [white30], [white12],
    ///    [white10], which are variants on this color but with different
    ///    opacities.
    ///  * [black], a solid black color.
    ///  * [transparent], a fully-transparent color.
    public static final int white = 0xFFFFFFFF;

    /// White with 70% opacity.
    ///
    /// This is a color commonly used for headings in dark themes.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// See also:
    ///
    ///  * [Typography.white], which uses this color for its text styles.
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [white], [white60], [white54], [white38], [white30], [white12],
    ///    [white10], which are variants on this color but with different
    ///    opacities.
    public static final int white70 = 0xB3FFFFFF;

    /// White with 60% opacity.
    ///
    /// Used for medium-emphasis text and hpublic static final int text when [ThemeData.brightness] is
    /// set to [Brightness.dark].
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// See also:
    ///
    ///  * [ExpandIcon], which uses this color for dark themes.
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [white], [white54], [white30], [white38], [white12], [white10], which
    ///    are variants on this color but with different opacities.
    public static final int white60 = 0x99FFFFFF;

    /// White with 54% opacity.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// See also:
    ///
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [white], [white60], [white38], [white30], [white12], [white10], which
    ///    are variants on this color but with different opacities.
    public static final int white54 = 0x8AFFFFFF;

    /// White with 38% opacity.
    ///
    /// Used for disabled radio buttons and the text of disabled flat buttons in dark themes.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// See also:
    ///
    ///  * [ThemeData.disabledColor], which uses this color by default in dark themes.
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [white], [white60], [white54], [white70], [white30], [white12],
    ///    [white10], which are variants on this color but with different
    ///    opacities.
    public static final int white38 = 0x62FFFFFF;

    /// White with 30% opacity.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// See also:
    ///
    ///  * [Theme.of], which allows you to select colors from the current theme
    ///    rather than hard-coding colors in your build methods.
    ///  * [white], [white60], [white54], [white70], [white38], [white12],
    ///    [white10], which are variants on this color but with different
    ///    opacities.
    public static final int white30 = 0x4DFFFFFF;

    /// White with 24% opacity.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// Used for the splash color for filled buttons.
    ///
    /// See also:
    ///
    ///  * [white], [white60], [white54], [white70], [white38], [white30],
    ///    [white10], which are variants on this color
    ///    but with different opacities.
    public static final int white24 = 0x3DFFFFFF;

    /// White with 12% opacity.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// Used for the background of disabled raised buttons in dark themes.
    ///
    /// See also:
    ///
    ///  * [white], [white60], [white54], [white70], [white38], [white30],
    ///    [white10], which are variants on this color but with different
    ///    opacities.
    public static final int white12 = 0x1FFFFFFF;

    /// White with 10% opacity.
    ///
    /// ![](https://flutter.github.io/assets-for-api-docs/assets/material/Colors.whites.png)
    ///
    /// See also:
    ///
    ///  * [white], [white60], [white54], [white70], [white38], [white30],
    ///    [white12], which are variants on this color
    ///    but with different opacities.
    ///  * [transparent], a fully-transparent color, not far from this one.
    public static final int white10 = 0x1AFFFFFF;

    private static final int _redPrimaryValue = 0xFFF44336;

    private static Map<Integer, Integer> getRed() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFFFEBEE);
        map.put(100, 0xFFFFCDD2);
        map.put(200, 0xFFEF9A9A);
        map.put(300, 0xFFE57373);
        map.put(400, 0xFFEF5350);
        map.put(500, _redPrimaryValue);
        map.put(600, 0xFFE53935);
        map.put(700, 0xFFD32F2F);
        map.put(800, 0xFFC62828);
        map.put(900, 0xFFB71C1C);
        return map;
    }

    public static final MaterialColor red = new MaterialColor(
            _redPrimaryValue, getRed());

    private static final int _redAccentValue = 0xFFFF5252;

    private static Map<Integer, Integer> getRedAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFFF8A80);
        map.put(200, _redAccentValue);
        map.put(400, 0xFFFF1744);
        map.put(700, 0xFFD50000);
        return map;
    }

    public static final MaterialAccentColor redAccent = new MaterialAccentColor(
            _redAccentValue,
            getRedAccent()
    );

    private static final int _pinkPrimaryValue = 0xFFE91E63;

    private static Map<Integer, Integer> getPinkPrimary() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFFCE4EC);
        map.put(100, 0xFFF8BBD0);
        map.put(200, 0xFFF48FB1);
        map.put(300, 0xFFF06292);
        map.put(400, 0xFFEC407A);
        map.put(500, _pinkPrimaryValue);
        map.put(600, 0xFFD81B60);
        map.put(700, 0xFFC2185B);
        map.put(800, 0xFFAD1457);
        map.put(900, 0xFF880E4F);
        return map;
    }


    public static final MaterialColor pink = new MaterialColor(
            _pinkPrimaryValue,
            getPinkPrimary()
    );

    private static final int _pinkAccentPrimaryValue = 0xFFFF4081;

    private static Map<Integer, Integer> getPinkAccentPrimary() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFFF80AB);
        map.put(200, _pinkAccentPrimaryValue);
        map.put(400, 0xFFF50057);
        map.put(700, 0xFFC51162);
        return map;
    }

    public static final MaterialAccentColor pinkAccent = new MaterialAccentColor(
            _pinkAccentPrimaryValue,
            getPinkAccentPrimary()
    );


    private static final int _purplePrimaryValue = 0xFF9C27B0;

    private static Map<Integer, Integer> getPurple() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFF3E5F5);
        map.put(100, 0xFFE1BEE7);
        map.put(200, 0xFFCE93D8);
        map.put(300, 0xFFBA68C8);
        map.put(400, 0xFFAB47BC);
        map.put(500, _purplePrimaryValue);
        map.put(600, 0xFF8E24AA);
        map.put(700, 0xFF7B1FA2);
        map.put(800, 0xFF6A1B9A);
        map.put(900, 0xFF4A148C);
//    )
        return map;
    }

    public static final MaterialColor purple = new MaterialColor(
            _purplePrimaryValue,
            getPurple()
    );

    private static final int _purpleAccentPrimaryValue = 0xFFE040FB;

    private static Map<Integer, Integer> getPurpleAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFEA80FC);
        map.put(200, _purpleAccentPrimaryValue);
        map.put(400, 0xFFD500F9);
        map.put(700, 0xFFAA00FF);
        return map;
    }

    public static final MaterialAccentColor purpleAccent = new MaterialAccentColor(
            _purpleAccentPrimaryValue,
            getPurpleAccent()
    );

    private static final int _deepPurplePrimaryValue = 0xFF673AB7;

    private static Map<Integer, Integer> getDeepPurple() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFEDE7F6);
        map.put(100, 0xFFD1C4E9);
        map.put(200, 0xFFB39DDB);
        map.put(300, 0xFF9575CD);
        map.put(400, 0xFF7E57C2);
        map.put(500, _deepPurplePrimaryValue);
        map.put(600, 0xFF5E35B1);
        map.put(700, 0xFF512DA8);
        map.put(800, 0xFF4527A0);
        map.put(900, 0xFF311B92);
        return map;
    }

    public static final MaterialColor deepPurple = new MaterialColor(
            _deepPurplePrimaryValue, getDeepPurple()

    );


    private static final int _deepPurpleAccentPrimaryValue = 0xFF7C4DFF;

    private static Map<Integer, Integer> getDeepPurpleAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFB388FF);
        map.put(200, _deepPurpleAccentPrimaryValue);
        map.put(400, 0xFF651FFF);
        map.put(700, 0xFF6200EA);
        return map;
    }

    public static final MaterialAccentColor deepPurpleAccent = new MaterialAccentColor(
            _deepPurpleAccentPrimaryValue,
            getDeepPurpleAccent()
    );


    private static final int _indigoPrimaryValue = 0xFF3F51B5;

    private static Map<Integer, Integer> getIndigo() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFE8EAF6);
        map.put(100, 0xFFC5CAE9);
        map.put(200, 0xFF9FA8DA);
        map.put(300, 0xFF7986CB);
        map.put(400, 0xFF5C6BC0);
        map.put(500, _indigoPrimaryValue);
        map.put(600, 0xFF3949AB);
        map.put(700, 0xFF303F9F);
        map.put(800, 0xFF283593);
        map.put(900, 0xFF1A237E);
        return map;
    }

    public static final MaterialColor indigo = new MaterialColor(
            _indigoPrimaryValue, getIndigo()

    );


    private static final int _indigoAccentPrimaryValue = 0xFF536DFE;

    private static Map<Integer, Integer> getIndigoAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFF8C9EFF);
        map.put(200, _indigoAccentPrimaryValue);
        map.put(400, 0xFF3D5AFE);
        map.put(700, 0xFF304FFE);
        return map;
    }

    public static final MaterialAccentColor indigoAccent = new MaterialAccentColor(
            _indigoAccentPrimaryValue,
            getIndigoAccent()
    );


    private static final int _bluePrimaryValue = 0xFF2196F3;

    private static Map<Integer, Integer> getBlue() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFE3F2FD);
        map.put(100, 0xFFBBDEFB);
        map.put(200, 0xFF90CAF9);
        map.put(300, 0xFF64B5F6);
        map.put(400, 0xFF42A5F5);
        map.put(500, _bluePrimaryValue);
        map.put(600, 0xFF1E88E5);
        map.put(700, 0xFF1976D2);
        map.put(800, 0xFF1565C0);
        map.put(900, 0xFF0D47A1);
        return map;
    }

    public static final MaterialColor blue = new MaterialColor(
            _bluePrimaryValue, getBlue()
    );


    private static final int _blueAccentPrimaryValue = 0xFF448AFF;

    private static Map<Integer, Integer> getBlueAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFF82B1FF);
        map.put(200, _blueAccentPrimaryValue);
        map.put(400, 0xFF2979FF);
        map.put(700, 0xFF2962FF);
        return map;
    }

    public static final MaterialAccentColor blueAccent = new MaterialAccentColor(
            _blueAccentPrimaryValue,
            getBlueAccent()
    );


    private static final int _lightBluePrimaryValue = 0xFF03A9F4;

    private static Map<Integer, Integer> getLightBlue() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFE1F5FE);
        map.put(100, 0xFFB3E5FC);
        map.put(200, 0xFF81D4FA);
        map.put(300, 0xFF4FC3F7);
        map.put(400, 0xFF29B6F6);
        map.put(500, _lightBluePrimaryValue);
        map.put(600, 0xFF039BE5);
        map.put(700, 0xFF0288D1);
        map.put(800, 0xFF0277BD);
        map.put(900, 0xFF01579B);
        return map;
    }

    public static final MaterialColor lightBlue = new MaterialColor(
            _lightBluePrimaryValue, getLightBlue()
    );

    private static final int _lightBlueAccentPrimaryValue = 0xFF40C4FF;

    private static Map<Integer, Integer> getLightBlueAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFF80D8FF);
        map.put(200, _lightBlueAccentPrimaryValue);
        map.put(400, 0xFF00B0FF);
        map.put(700, 0xFF0091EA);
        return map;
    }

    public static final MaterialAccentColor lightBlueAccent = new MaterialAccentColor(
            _lightBlueAccentPrimaryValue,
            getLightBlueAccent()
    );


    private static final int _cyanPrimaryValue = 0xFF00BCD4;

    private static Map<Integer, Integer> getCyan() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFE0F7FA);
        map.put(100, 0xFFB2EBF2);
        map.put(200, 0xFF80DEEA);
        map.put(300, 0xFF4DD0E1);
        map.put(400, 0xFF26C6DA);
        map.put(500, _cyanPrimaryValue);
        map.put(600, 0xFF00ACC1);
        map.put(700, 0xFF0097A7);
        map.put(800, 0xFF00838F);
        map.put(900, 0xFF006064);
        return map;
    }

    public static final MaterialColor cyan = new MaterialColor(
            _cyanPrimaryValue, getCyan()

    );


    private static final int _cyanAccentPrimaryValue = 0xFF18FFFF;

    private static Map<Integer, Integer> getCyanAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFF84FFFF);
        map.put(200, _cyanAccentPrimaryValue);
        map.put(400, 0xFF00E5FF);
        map.put(700, 0xFF00B8D4);
        return map;
    }

    public static final MaterialAccentColor cyanAccent = new MaterialAccentColor(
            _cyanAccentPrimaryValue, getCyanAccent()

    );


    private static final int _tealPrimaryValue = 0xFF009688;

    private static Map<Integer, Integer> getTeal() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFE0F2F1);
        map.put(100, 0xFFB2DFDB);
        map.put(200, 0xFF80CBC4);
        map.put(300, 0xFF4DB6AC);
        map.put(400, 0xFF26A69A);
        map.put(500, _tealPrimaryValue);
        map.put(600, 0xFF00897B);
        map.put(700, 0xFF00796B);
        map.put(800, 0xFF00695C);
        map.put(900, 0xFF004D40);
        return map;
    }

    public static final MaterialColor teal = new MaterialColor(
            _tealPrimaryValue, getTeal()

    );


    private static final int _tealAccentPrimaryValue = 0xFF64FFDA;

    private static Map<Integer, Integer> getTealAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFA7FFEB);
        map.put(200, _tealAccentPrimaryValue);
        map.put(400, 0xFF1DE9B6);
        map.put(700, 0xFF00BFA5);
        return map;
    }

    public static final MaterialAccentColor tealAccent = new MaterialAccentColor(
            _tealAccentPrimaryValue, getTealAccent()

    );


    private static final int _greenPrimaryValue = 0xFF4CAF50;

    private static Map<Integer, Integer> getGreen() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFE8F5E9);
        map.put(100, 0xFFC8E6C9);
        map.put(200, 0xFFA5D6A7);
        map.put(300, 0xFF81C784);
        map.put(400, 0xFF66BB6A);
        map.put(500, _greenPrimaryValue);
        map.put(600, 0xFF43A047);
        map.put(700, 0xFF388E3C);
        map.put(800, 0xFF2E7D32);
        map.put(900, 0xFF1B5E20);
        return map;
    }

    public static final MaterialColor green = new MaterialColor(
            _greenPrimaryValue, getGreen()

    );


    private static final int _greenAccentPrimaryValue = 0xFF69F0AE;

    private static Map<Integer, Integer> getGreenAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFB9F6CA);
        map.put(200, _greenAccentPrimaryValue);
        map.put(400, 0xFF00E676);
        map.put(700, 0xFF00C853);
        return map;
    }

    public static final MaterialAccentColor greenAccent = new MaterialAccentColor(
            _greenAccentPrimaryValue, getGreenAccent()

    );


    private static final int _lightGreenPrimaryValue = 0xFF8BC34A;

    private static Map<Integer, Integer> getLightGreen() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFF1F8E9);
        map.put(100, 0xFFDCEDC8);
        map.put(200, 0xFFC5E1A5);
        map.put(300, 0xFFAED581);
        map.put(400, 0xFF9CCC65);
        map.put(500, _lightGreenPrimaryValue);
        map.put(600, 0xFF7CB342);
        map.put(700, 0xFF689F38);
        map.put(800, 0xFF558B2F);
        map.put(900, 0xFF33691E);
        return map;
    }

    public static final MaterialColor lightGreen = new MaterialColor(
            _lightGreenPrimaryValue, getLightGreen()
    );

    private static final int _lightGreenAccentPrimaryValue = 0xFFB2FF59;

    private static Map<Integer, Integer> getLightGreenAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFCCFF90);
        map.put(200, _lightGreenAccentPrimaryValue);
        map.put(400, 0xFF76FF03);
        map.put(700, 0xFF64DD17);
        return map;
    }

    public static final MaterialAccentColor lightGreenAccent = new MaterialAccentColor(
            _lightGreenAccentPrimaryValue, getLightGreenAccent()

    );


    private static final int _limePrimaryValue = 0xFFCDDC39;

    private static Map<Integer, Integer> getLime() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFF9FBE7);
        map.put(100, 0xFFF0F4C3);
        map.put(200, 0xFFE6EE9C);
        map.put(300, 0xFFDCE775);
        map.put(400, 0xFFD4E157);
        map.put(500, _limePrimaryValue);
        map.put(600, 0xFFC0CA33);
        map.put(700, 0xFFAFB42B);
        map.put(800, 0xFF9E9D24);
        map.put(900, 0xFF827717);
        return map;
    }

    public static final MaterialColor lime = new MaterialColor(
            _limePrimaryValue, getLime()
    );


    private static final int _limeAccentPrimaryValue = 0xFFEEFF41;

    private static Map<Integer, Integer> getLimeAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFF4FF81);
        map.put(200, _limeAccentPrimaryValue);
        map.put(400, 0xFFC6FF00);
        map.put(700, 0xFFAEEA00);
        return map;
    }

    public static final MaterialAccentColor limeAccent = new MaterialAccentColor(
            _limeAccentPrimaryValue, getLimeAccent()
    );


    private static final int _yellowPrimaryValue = 0xFFFFEB3B;

    private static Map<Integer, Integer> getYellow() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFFFFDE7);
        map.put(100, 0xFFFFF9C4);
        map.put(200, 0xFFFFF59D);
        map.put(300, 0xFFFFF176);
        map.put(400, 0xFFFFEE58);
        map.put(500, _yellowPrimaryValue);
        map.put(600, 0xFFFDD835);
        map.put(700, 0xFFFBC02D);
        map.put(800, 0xFFF9A825);
        map.put(900, 0xFFF57F17);
        return map;
    }

    public static final MaterialColor yellow = new MaterialColor(
            _yellowPrimaryValue, getYellow()

    );


    private static final int _yellowAccentPrimaryValue = 0xFFFFFF00;

    private static Map<Integer, Integer> getYellowAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFFFFF8D);
        map.put(200, _yellowAccentPrimaryValue);
        map.put(400, 0xFFFFEA00);
        map.put(700, 0xFFFFD600);
        return map;
    }

    public static final MaterialAccentColor yellowAccent = new MaterialAccentColor(
            _yellowAccentPrimaryValue, getYellowAccent()

    );

    private static final int _amberPrimaryValue = 0xFFFFC107;

    private static Map<Integer, Integer> getAmber() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFFFF8E1);
        map.put(100, 0xFFFFECB3);
        map.put(200, 0xFFFFE082);
        map.put(300, 0xFFFFD54F);
        map.put(400, 0xFFFFCA28);
        map.put(500, _amberPrimaryValue);
        map.put(600, 0xFFFFB300);
        map.put(700, 0xFFFFA000);
        map.put(800, 0xFFFF8F00);
        map.put(900, 0xFFFF6F00);
        return map;
    }

    public static final MaterialColor amber = new MaterialColor(
            _amberPrimaryValue, getAmber()
    );

    private static final int _amberAccentPrimaryValue = 0xFFFFD740;

    private static Map<Integer, Integer> getAmberAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFFFE57F);
        map.put(200, _amberAccentPrimaryValue);
        map.put(400, 0xFFFFC400);
        map.put(700, 0xFFFFAB00);
        return map;
    }

    public static final MaterialAccentColor amberAccent = new MaterialAccentColor(
            _amberAccentPrimaryValue, getAmberAccent()
    );
    private static final int _orangePrimaryValue = 0xFFFF9800;

    private static Map<Integer, Integer> getOrange() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFFFF3E0);
        map.put(100, 0xFFFFE0B2);
        map.put(200, 0xFFFFCC80);
        map.put(300, 0xFFFFB74D);
        map.put(400, 0xFFFFA726);
        map.put(500, _orangePrimaryValue);
        map.put(600, 0xFFFB8C00);
        map.put(700, 0xFFF57C00);
        map.put(800, 0xFFEF6C00);
        map.put(900, 0xFFE65100);
        return map;
    }

    public static final MaterialColor orange = new MaterialColor(
            _orangePrimaryValue, getOrange()
    );
    private static final int _orangeAccentPrimaryValue = 0xFFFFAB40;

    private static Map<Integer, Integer> getOrangeAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFFFD180);
        map.put(200, _orangeAccentPrimaryValue);
        map.put(400, 0xFFFF9100);
        map.put(700, 0xFFFF6D00);
        return map;
    }

    public static final MaterialAccentColor orangeAccent = new MaterialAccentColor(
            _orangeAccentPrimaryValue, getOrangeAccent()
    );

    private static final int _deepOrangePrimaryValue = 0xFFFF5722;

    private static Map<Integer, Integer> getDeepOrange() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFFBE9E7);
        map.put(100, 0xFFFFCCBC);
        map.put(200, 0xFFFFAB91);
        map.put(300, 0xFFFF8A65);
        map.put(400, 0xFFFF7043);
        map.put(500, _deepOrangePrimaryValue);
        map.put(600, 0xFFF4511E);
        map.put(700, 0xFFE64A19);
        map.put(800, 0xFFD84315);
        map.put(900, 0xFFBF360C);
        return map;
    }

    public static final MaterialColor deepOrange = new MaterialColor(
            _deepOrangePrimaryValue, getDeepOrange()
    );
    private static final int _deepOrangeAccentPrimaryValue = 0xFFFF6E40;

    private static Map<Integer, Integer> getDeepOrangeAccent() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(100, 0xFFFF9E80);
        map.put(200, _deepOrangeAccentPrimaryValue);
        map.put(400, 0xFFFF3D00);
        map.put(700, 0xFFDD2C00);
        return map;
    }

    public static final MaterialAccentColor deepOrangeAccent = new MaterialAccentColor(
            _deepOrangeAccentPrimaryValue, getDeepOrangeAccent()
    );

    private static final int _brownPrimaryValue = 0xFF795548;

    private static Map<Integer, Integer> getBrown() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFEFEBE9);
        map.put(100, 0xFFD7CCC8);
        map.put(200, 0xFFBCAAA4);
        map.put(300, 0xFFA1887F);
        map.put(400, 0xFF8D6E63);
        map.put(500, _brownPrimaryValue);
        map.put(600, 0xFF6D4C41);
        map.put(700, 0xFF5D4037);
        map.put(800, 0xFF4E342E);
        map.put(900, 0xFF3E2723);
        return map;
    }

    public static final MaterialColor brown = new MaterialColor(
            _brownPrimaryValue, getBrown()

    );


    private static final int _greyPrimaryValue = 0xFF9E9E9E;

    private static Map<Integer, Integer> getGrey() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFFAFAFA);
        map.put(100, 0xFFF5F5F5);
        map.put(200, 0xFFEEEEEE);
        map.put(300, 0xFFE0E0E0);
        map.put(350, 0xFFD6D6D6); // only for raised button while pressed in light theme
        map.put(400, 0xFFBDBDBD);
        map.put(500, _greyPrimaryValue);
        map.put(600, 0xFF757575);
        map.put(700, 0xFF616161);
        map.put(800, 0xFF424242);
        map.put(850, 0xFF303030); // only for background color in dark theme
        map.put(900, 0xFF212121);
        return map;
    }

    public static final MaterialColor grey = new MaterialColor(
            _greyPrimaryValue, getGrey()
    );

    private static final int _blueGreyPrimaryValue = 0xFF607D8B;

    private static Map<Integer, Integer> getBlueGrey() {
        Map<Integer, Integer> map = new HashMap<>();
        map.put(50, 0xFFECEFF1);
        map.put(100, 0xFFCFD8DC);
        map.put(200, 0xFFB0BEC5);
        map.put(300, 0xFF90A4AE);
        map.put(400, 0xFF78909C);
        map.put(500, _blueGreyPrimaryValue);
        map.put(600, 0xFF546E7A);
        map.put(700, 0xFF455A64);
        map.put(800, 0xFF37474F);
        map.put(900, 0xFF263238);
        return map;
    }

    public static final MaterialColor blueGrey = new MaterialColor(
            _blueGreyPrimaryValue, getBlueGrey()
    );

    private static List<MaterialColor> getPrimaries() {
        List<MaterialColor> list = new ArrayList<>();
        list.add(red);
        list.add(pink);
        list.add(purple);
        list.add(deepPurple);
        list.add(indigo);
        list.add(blue);
        list.add(lightBlue);
        list.add(cyan);
        list.add(teal);
        list.add(green);
        list.add(lightGreen);
        list.add(lime);
        list.add(yellow);
        list.add(amber);
        list.add(orange);
        list.add(deepOrange);
        list.add(brown);
        list.add(blueGrey);
        return list;
    }

    /// The Material Design primary color swatches); excluding grey.
    public final static List<MaterialColor> primaries = getPrimaries();

    private static List<MaterialAccentColor> getAccents() {
        List<MaterialAccentColor> list = new ArrayList<>();
        list.add(redAccent);
        list.add(pinkAccent);
        list.add(purpleAccent);
        list.add(deepPurpleAccent);
        list.add(indigoAccent);
        list.add(blueAccent);
        list.add(lightBlueAccent);
        list.add(cyanAccent);
        list.add(tealAccent);
        list.add(greenAccent);
        list.add(lightGreenAccent);
        list.add(limeAccent);
        list.add(yellowAccent);
        list.add(amberAccent);
        list.add(orangeAccent);
        list.add(deepOrangeAccent);
        return list;
    }

    /// The Material Design accent color swatches.
    public final static List<MaterialAccentColor> accents = getAccents();


    /**
     * Set the alpha component of {@code color} to be {@code alpha}.
     *
     * @param color The color.
     * @param alpha Alpha component \([0..255]\) of the color.
     * @return the {@code color} with {@code alpha} component
     */
    public static int withAlpha(final int color,
                                int alpha) {
        return (color & 0x00ffffff) | (alpha << 24);
    }

    /**
     * Set the alpha component of {@code color} to be {@code alpha}.
     *
     * @param color   The color.
     * @param opacity Opacity component \([0..1]\) of the color.
     * @return the {@code color} with {@code alpha} component
     */
    public static int withOpacity(int color,
                                  float opacity) {
        return (color & 0x00ffffff) | ((int) (opacity * 255.0f + 0.5f) << 24);
    }

    /**
     * Set the red component of {@code color} to be {@code red}.
     *
     * @param color The color.
     * @param red   Red component \([0..255]\) of the color.
     * @return the {@code color} with {@code red} component
     */
    public static int withRed(int color,
                              int red) {
        return (color & 0xff00ffff) | (red << 16);
    }

    /**
     * Set the red component of {@code color} to be {@code red}.
     *
     * @param color The color.
     * @param red   Red component \([0..1]\) of the color.
     * @return the {@code color} with {@code red} component
     */
    public static int withRed(int color,
                              float red) {
        return (color & 0xff00ffff) | ((int) (red * 255.0f + 0.5f) << 16);
    }

    /**
     * Set the green component of {@code color} to be {@code green}.
     *
     * @param color The color.
     * @param green Green component \([0..255]\) of the color.
     * @return the {@code color} with {@code green} component
     */
    public static int withGreen(int color,
                                int green) {
        return (color & 0xffff00ff) | (green << 8);
    }

    /**
     * Set the green component of {@code color} to be {@code green}.
     *
     * @param color The color.
     * @param green Green component \([0..1]\) of the color.
     * @return the {@code color} with {@code green} component
     */
    public static int withGreen(int color,
                                float green) {
        return (color & 0xffff00ff) | ((int) (green * 255.0f + 0.5f) << 8);
    }

    /**
     * Set the blue component of {@code color} to be {@code blue}.
     *
     * @param color The color.
     * @param blue  Blue component \([0..255]\) of the color.
     * @return the {@code color} with {@code blue} component
     */
    public static int withBlue(int color,
                               int blue) {
        return (color & 0xffffff00) | blue;
    }

    /**
     * Set the blue component of {@code color} to be {@code blue}.
     *
     * @param color The color.
     * @param blue  Blue component \([0..1]\) of the color.
     * @return the {@code color} with {@code blue} component
     */
    public static int withBlue(int color,
                               float blue) {
        return (color & 0xffffff00) | (int) (blue * 255.0f + 0.5f);
    }

    /**
     * Color-int to color-string.
     *
     * @param colorInt The color-int.
     * @return color-string
     */
    public static String int2RgbString(int colorInt) {
        colorInt = colorInt & 0x00ffffff;
        StringBuilder color = new StringBuilder(Integer.toHexString(colorInt));
        while (color.length() < 6) {
            color.insert(0, "0");
        }
        return "#" + color;
    }

    /**
     * Color-int to color-string.
     *
     * @param colorInt The color-int.
     * @return color-string
     */
    public static String int2ArgbString(final int colorInt) {
        StringBuilder color = new StringBuilder(Integer.toHexString(colorInt));
        while (color.length() < 6) {
            color.insert(0, "0");
        }
        while (color.length() < 8) {
            color.insert(0, "f");
        }
        return "#" + color;
    }

    /**
     * Return the random color.
     *
     * @return the random color
     */
    public static int getRandomColor() {
        return getRandomColor(true);
    }

    /**
     * Return the random color.
     *
     * @param supportAlpha True to support alpha, false otherwise.
     * @return the random color
     */
    public static int getRandomColor(final boolean supportAlpha) {
        int high = supportAlpha ? (int) (Math.random() * 0x100) << 24 : 0xFF000000;
        return high | (int) (Math.random() * 0x1000000);
    }


}
